#include <cstdio>

inline double abs(double x) { return x >= 0 ? x : -x; }

double a, b, c, d, L, R;

inline double f(double x) { return (x * c + d) / (a * x + b); }

inline double integ(double l, double r) { return (f(l) + 4 * f((l + r) / 2) + f(r)) * (r - l) / 6; }

double autosimpson(double l, double r, double eps, double tmp) {
	double mid = (l + r) / 2;
	double la = integ(l, mid), ra = integ(mid, r);
	if (abs(la + ra - tmp) < 15 * eps) return la + ra + (la + ra - tmp) / 15;
	return autosimpson(l, mid, eps / 2, la) + autosimpson(mid, r, eps / 2, ra);
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
	freopen("testdata.in", "r", stdin);
	freopen("testdata.out", "w", stdout);
#endif
#ifndef LOCAL
	freopen("Simpson Integration.in", "r", stdin);
	freopen("Simpson Integration.out", "w", stdout);
#endif
#endif

	scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &L, &R);
	printf("%.6lf", autosimpson(L, R, 1e-6, integ(L, R)));
	return 0;
}